PESetPrintDate
Use PESetPrintDate to set a print date that may be different than the system calendar date. Use this function any time you want to show a print date (or use a print date in formulas) other than the actual date of printing.
C Syntax
BOOL CRPE_API PESetPrintDate (
short printJob,
short year,
short month,
short day );
Parameters
printJob
| Specifies the print job for which you want to set the print date.
|
year
| Specifies the year component of the print date. Enter a 4 digit year value (1994, 1993, etc.).
|
month
| Specifies the month component of the print date. Months are numbered from 1 to 12, where January = 1 and December = 12. To use July as the print month, for example, you would enter the value 7.
|
day
| Specifies the day component of the print date. Enter the actual day of the month you want to use (7, 18, 28, etc.).
|
Returns
- TRUE if the call is successful.
- FALSE if the call fails.
Remarks
- You change the print date, typically, when you want to run the report today yet have it appear to have been run on a different date. An example would be, if you were out of town on the last day of the previous month and you later want to run a report for that month and make it appear as if it were run on the last day of the month.
- This function should be called before PEStartPrintJob, or the results may be inconsistent or unexpected.
VB Syntax
Declare Function PESetPrintDate Lib "crpe32.dll" (ByVal printJob As
Integer, ByVal Date_Year As Integer, ByVal Date_Month As Integer, ByVal
Date_Day As Integer) As Integer
Delphi Syntax
function PESetPrintDate (
printJob: Word;
year: smallint;
month: smallint;
day: smallint
): Bool stdcall;
dBASE for Windows Syntax
EXTERN CLOGICAL PESetPrintDate (CWORD, CWORD, CWORD, CWORD) CRPE.DLL